package com.hymall.controller.wx;

import com.hymall.bean.MarketBrand;
import com.hymall.bean.common.BasePageInfo;
import com.hymall.bean.common.BaseRespVo;
import com.hymall.bean.common.CommonData;
import com.hymall.service.wx.BrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 长平居士 - rolfcui@outlook.com
 * @description 商场管理 - 品牌制造商
 * @date 2022/7/19 13:57
 */
@RestController
@RequestMapping("wx/brand")
public class WxBrandController {

    @Autowired
    BrandService brandService;

    @GetMapping("list")
    public BaseRespVo list(BasePageInfo info) {
        CommonData<MarketBrand> data = brandService.query(info);
        return BaseRespVo.ok(data);
    }

    @GetMapping("detail")
    public BaseRespVo detail(Integer id) {
        MarketBrand data = brandService.detail(id);
        return BaseRespVo.ok(data);
    }
}
